projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f7c6c97
)
examples: Use symbolic names for button numbers
author
Carlos Garcia Campos
<cgarcia@igalia.com>
Wed, 25 Jan 2012 18:10:47 +0000
(19:10 +0100)
committer
Carlos Garcia Campos
<carlosgc@gnome.org>
Fri, 27 Jan 2012 08:47:44 +0000
(09:47 +0100)
examples/drawing.c
patch
|
blob
|
history
diff --git
a/examples/drawing.c
b/examples/drawing.c
index 1534b451bcbb0a5710b560bacd2a9ef9fa7d3a0a..68fb81eabc215d395be37fbe8f64bcb371cf31ef 100644
(file)
--- a/
examples/drawing.c
+++ b/
examples/drawing.c
@@
-86,11
+86,11
@@
button_press_event_cb (GtkWidget *widget,
if (surface == NULL)
return FALSE;
- if (event->button ==
1
)
+ if (event->button ==
GDK_BUTTON_PRIMARY
)
{
draw_brush (widget, event->x, event->y);
}
- else if (event->button ==
3
)
+ else if (event->button ==
GDK_BUTTON_SECONDARY
)
{
clear_surface ();
gtk_widget_queue_draw (widget);